﻿using BySoft.Server.Common;
using BySoft.Server.Common.Entity;
using BySoft.Server.DataAccess;
using BySoft.Server.DataAccess.UserCode;
using OneSoft.DataAccess;
using OneSoft.EntityCore;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace BySoft.Server.Business
{
    public partial class BsKnifeinstock
    {

        public static bool CheckExist(string KnifeinstockIDValue)
        {

            return ClsComm.CheckExist("BS_Knifeinstock", "BillID", KnifeinstockIDValue, true);
           
        }
        public static bool CheckUsed(string BillIDValue)
        {

            bool result = false;
            return result;

        }
        public static bool SaveOrUpdate(BsKnifeinstockEntity entity, DataTable KnifeinstockDetailDT, bool isNew)
        {
            return BsKnifeinstockDA.SaveOrUpdate(entity, KnifeinstockDetailDT, isNew);
        }

        public static bool Del(string strCode)
        {
            return BsKnifeinstockDA.Del(strCode);
        }

        public static DataTable SelectList(string strKnifeInStockID, string strKnifeID, string strSupplierID, string strFrom, string strEnd, int pageIndex, int PageSize, out int m_count)
        {
            return BsKnifeinstockDA.SelectList(strKnifeInStockID, strKnifeID, strSupplierID, strFrom, strEnd, pageIndex, PageSize, out m_count);
        }

       
           public static DataTable SelectHeadData(string strBillID)
           {
               return BsKnifeinstockDA.SelectHeadData(strBillID);
           }
           public static DataTable SelectDetailData(string strBillID)
           {
               return BsKnifeinstockDA.SelectDetailData(strBillID);
           }



         
           public static DataTable CreateDT()
           {
               return SelectHeadData("-1");
           }


           public static DataTable CreateDetailDT()
           {
               return SelectDetailData("-1");
           }
    }
}
